use std::ops::BitXor;

struct Solution {}

fn main() {}

impl Solution {
    pub fn min_bit_flips(start: i32, goal: i32) -> i32 {
        let mut ret_n = start ^ goal;
        ret_n.reverse_bits();
        let mut ret = 0;
        while ret_n > 0 {
            if ret_n % 2 == 0 {
                ret_n /= 2;
                continue;
            }
            ret_n /= 2;
            ret += 1;
        }
        ret
    }
}